package org.mch.func.img.cut;

import java.awt.Font;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextField;

import org.mch.biz.ui.BizEvent;
import org.mch.biz.ui.BizPanel;

public class ClientPanel extends BizPanel {
	private static final long serialVersionUID = -49555473212520816L;
	private JLabel label;
	private JButton btn_brower;
	private JButton btn_cutimg;
	private JTextField text_folder;

	public ClientPanel() {
		super();
		setLayout(null);
		add(getLabel());
		add(getBtn_brower());
		add(getBtn_cutimg());
		add(getText_folder());
	}

	@Override
	protected BizEvent createEvent() {
		return new ClientEvent(this);
	}

	public JLabel getLabel() {
		if (label == null) {
			label = new JLabel("文件夹：");
			label.setFont(new Font("宋体", Font.BOLD, 12));
			label.setBounds(10, 10, 60, 24);
		}
		return label;
	}

	public JButton getBtn_brower() {
		if (btn_brower == null) {
			btn_brower = new JButton("浏览");
			btn_brower.setBounds(554, 46, 93, 23);
			btn_brower.addMouseListener(getEvent());
		}
		return btn_brower;
	}

	public JButton getBtn_cutimg() {
		if (btn_cutimg == null) {
			btn_cutimg = new JButton("执行裁剪");
			btn_cutimg.setBounds(554, 81, 93, 23);
			btn_cutimg.addMouseListener(getEvent());
		}
		return btn_cutimg;
	}
	public JTextField getText_folder() {
		if (text_folder == null) {
			text_folder = new JTextField();
			text_folder.setFont(new Font("宋体", Font.PLAIN, 12));
			text_folder.setBounds(68, 12, 579, 22);
			text_folder.setColumns(10);
		}
		return text_folder;
	}
}
